package com.weige.api.client;

import com.weige.api.fallback.UserClientFallbackFactory;
import com.weige.api.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: wei
 * @date: 2022-11-12 11:10
 * @description: Feign客户端
 */
@FeignClient(value = "userservice", fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {
    @GetMapping("/user/{id}")
    User findById(@PathVariable("id") Long id);
}
